package com.atguigu.orderservice.client;

import com.atguigu.commonutils.Vo.EduCourseVo;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Feign服务调用
 * name属性被调用方服务名称
 * fallback属性执行Hystrix熔断实现类
 */
@FeignClient("service-edu")
@Component
public interface EduClient {

    /**
     * 根据课程id查询数据
     * @param courseId
     * @return
     */
    @GetMapping("/eduservice/course/getCourseVo/{courseId}")
    public EduCourseVo getCourseInfo(@ApiParam(value = "课程id",name = "courseId",required = true) @PathVariable String courseId);


}
